from django.shortcuts import render
from rest_framework import generics

from plan_app.models import Plan,ClassType
from plan_app.serializer import PlanSerializer,ClassTypeSerializer

# Create your views here.
#根据课程id获取特色服务
class PlanView(generics.ListAPIView):
    queryset = Plan.objects.all()
    serializer_class = PlanSerializer

    filterset_fields = ('course',)

class ClassTypeView(generics.ListAPIView):
    queryset = ClassType.objects.all()
    serializer_class = ClassTypeSerializer

    filterset_fields = ('course',)
